<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>玻璃</title>
    <style>
        * {
            padding: 0;
            margin: 0;


        }

        body {
            height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .box {
            position: relative;
            width: 300px;
            height: 200px;
            line-height: 200px;
            background: pink;
            text-align: center;
            color: #ffffff;
            border-radius: 10px;
            overflow: hidden;
            transition: all .2s;
        }

        .box::after {
            position: absolute;
            content: '';
            top: 100px;
            left: 0;
            width: 600px;
            height: 70px;
            background-image: linear-gradient(rgba(0, 0, 0, 0), rgba(255, 255, 255, .7), rgba(0, 0, 0, 0));
            transform: rotate(-45deg) translate(0, -360px);

        }

        .box:hover {
            margin-top: -10px;
            box-shadow: 3px 3px 3px rgba(0, 0, 0, .2);
        }

        .box:hover::after {
            transition: all 1s;
            transform: rotate(-45deg) translate(0, 100px);
        }
    </style>
</head>

<body>
    <div class="box">
        <h1>bilibili</h1>
    </div>

</body>

</html>